package com.house.mapper;

import com.house.entity.UserLogin;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface UserLoginMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(UserLogin record);

    int insertSelective(UserLogin record);

    UserLogin selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(UserLogin record);

    int updateByPrimaryKey(UserLogin record);

    UserLogin findByAdminAndPassword(@Param("admin") String admin, @Param("password") String password);
    UserLogin findByAdmin(@Param("admin") String admin);
    UserLogin findByEmail(@Param("email") String email);
    UserLogin findByTelphone(@Param("telphone") String telphone);
    List<UserLogin> findAllByStatus(@Param("status")int status);
    int updateByIdAndStatus(@Param("id")int id,@Param("status")int status);

    int updatePasswordById(@Param("id")int id,@Param("password")String password);
}